package Java攻略._3_流式操作._3_利用reduce方法实现归约操作;

import java.util.stream.Stream;

public class _21_利用二元运算符执行归约操作 {

    public static void main(String[] args) {
        Integer sum = Stream.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
                .reduce(0, Integer::sum);

        System.out.println(sum);
    }
}
